<template>
  <div class="layout-page">
    <router-view></router-view>
    <!-- 开启路由模式，根据van-tabbar绑定active -->
    <van-tabbar v-model="active" route>
      <!-- //点击跳转到to指定的路由页面 -->
  <van-tabbar-item to="/article" icon="wap-home-o">首页</van-tabbar-item>
  <van-tabbar-item to="/house" icon="browsing-history-o">找房</van-tabbar-item>
  <van-tabbar-item to="/information" icon="newspaper-o">资讯</van-tabbar-item>
  <van-tabbar-item :to="token? '/mylogin':'/myhouse'" icon="user-circle-o">我的</van-tabbar-item>
</van-tabbar>
  </div>
</template>
<script>
import { getToken } from '@/utils/storage'
export default {
  name: 'layout-page',
  data () {
    return {
      token: getToken(),
      active: 0
    }
  },
  methods: {
  }
}
</script>

<style lang="less" scoped></style>
